/**
 * @author        lx <1154354121@qq.com>
 * @date          2025-04-14 15:04:37
 * Copyright © YourCompanyName All rights reserved
 */
// app/api/login/route.ts
import { NextResponse } from 'next/server';

export async function POST(request: Request) {
  const { email, password } = await request.json();

  // 模拟验证（替换为数据库或后端逻辑）
  if (email === '123456' && password === '123456') {
    return NextResponse.json({
      id: '1',
      name: '测试用户',
      email: 'test@example.com',
    });
  }

  return NextResponse.json({ message: '邮箱或密码错误' }, { status: 401 });
}
